<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="人人开源">
  <meta name="keywords" content="人人开源">
  <meta name="author" content="人人开源">
  <title>人人开源</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">
  <link rel="stylesheet" href="../public/css/font-awesome.min.css">
  <link rel="stylesheet" href="../public/css/simple-line-icons.css">
  <link rel="stylesheet" href="../public/css/app.css">
  <link rel="stylesheet" href="../public/css/style.css">
  <link rel="stylesheet" href="../public/plugins/jqgrid/ui.jqgrid-bootstrap.css">
  <link rel="stylesheet" href="../public/plugins/ztree/css/metroStyle/metroStyle.css">
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  <style type="text/css">
  .wrapper {
  height: 100%;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
 }
 .wrapper:before,
 .wrapper:after {
  content: " ";
  display: table;
 }
 .wrapper:after {
  clear: both;
 }
  </style>
</head>
<body class="app header-fixed sidebar-fixed aside-menu-fixed aside-menu-hidden">
	<div class="wrapper" id="rrapp" v-cloak>
	<header class="app-header navbar">
        <button class="navbar-toggler mobile-sidebar-toggler d-lg-none" type="button">☰</button>
        <a class="navbar-brand" href="#"></a>
        <ul class="nav navbar-nav d-md-down-none">
            <li class="nav-item">
                <a class="nav-link navbar-toggler sidebar-toggler" href="#">☰</a>
            </li>
			<!-- 
            <li class="nav-item px-3">
                <a class="nav-link" href="#">Dashboard</a>
            </li>
            <li class="nav-item px-3">
                <a class="nav-link" href="#">Users</a>
            </li>
            <li class="nav-item px-3">
                <a class="nav-link" href="#">Settings</a>
            </li>
             -->
        </ul>
        <ul class="nav navbar-nav ml-auto">
            <li class="nav-item d-md-down-none">
                <a class="nav-link" href="#"><i class="icon-bell"></i><span class="badge badge-pill badge-danger">5</span></a>
            </li>
            <li class="nav-item d-md-down-none">
                <a class="nav-link" href="#"><i class="icon-list"></i></a>
            </li>
            <li class="nav-item d-md-down-none">
                <a class="nav-link" href="#"><i class="icon-location-pin"></i></a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle nav-link" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
                    <img src="../public/img/avatars/6.jpg" class="img-avatar" alt="头像">
                    <span class="d-md-down-none">{{username}}</span>
                </a>
                <div class="dropdown-menu dropdown-menu-right">
					
					<!-- 
                    <div class="dropdown-header text-center">
                        <strong>Account</strong>
                    </div>

                    <a class="dropdown-item" href="#"><i class="fa fa-bell-o"></i> Updates<span class="badge badge-info">42</span></a>
                    <a class="dropdown-item" href="#"><i class="fa fa-envelope-o"></i> Messages<span class="badge badge-success">42</span></a>
                    <a class="dropdown-item" href="#"><i class="fa fa-tasks"></i> Tasks<span class="badge badge-danger">42</span></a>
                    <a class="dropdown-item" href="#"><i class="fa fa-comments"></i> Comments<span class="badge badge-warning">42</span></a>
					 -->
                    <div class="dropdown-header text-center">
                        <strong>设置</strong>
                    </div>
					<!-- 
                    <a class="dropdown-item" href="#"><i class="fa fa-user"></i> Profile</a>
                    <a class="dropdown-item" href="#"><i class="fa fa-wrench"></i> Settings</a>
                    <a class="dropdown-item" href="#"><i class="fa fa-usd"></i> Payments<span class="badge badge-default">42</span></a>
                    <a class="dropdown-item" href="#"><i class="fa fa-file"></i> Projects<span class="badge badge-primary">42</span></a>
                    <div class="divider"></div>
                     -->
                    <a class="dropdown-item" href="javascript:;" @click="updatePassword"><i class="fa fa-edit"></i>修改密码</a>
                    <a class="dropdown-item" href="javascript:;" @click="doLogout"><i class="fa fa-power-off"></i>退出系统</a>
                </div>
            </li>
            <!-- 
            <li class="nav-item d-md-down-none">
                <a class="nav-link navbar-toggler aside-menu-toggler" href="#">☰</a>
            </li>
			-->
        </ul>
    </header>

    <div class="app-body">
        <div class="sidebar">
            <nav class="sidebar-nav">
                <ul class="nav">
                    <li class="nav-title">导航菜单</li>
                    <menu-item :item="item" v-for="item in menuList"></menu-item>
                </ul>
            </nav>
        </div>

        <!-- Main content -->
        <main class="main">

            <!-- Breadcrumb -->
            <ol class="breadcrumb">
                <li class="breadcrumb-item">首页</li>
				<li class="breadcrumb-item">系统管理</li>
				<li class="breadcrumb-item">代码生成器</li>
                <!-- Breadcrumb Menu-->
                <li class="breadcrumb-menu d-md-down-none">
                    <div class="btn-group" role="group" aria-label="Button group with nested dropdown">
                        <a class="btn btn-secondary" href="javascript:;"><i class="icon-graph"></i> &nbsp;导航菜单</a>
                    </div>
                </li>
            </ol>


            <div class="container-fluid">
                <div class="animated fadeIn">
						<div class="mb-2">
							<div class="form-group row">
								<div class="col-md-2"><input type="text" class="form-control" v-model="q.tableName" @keyup.enter="query" placeholder="表名"></div>
								<div class="col-md-10">
								<a class="btn btn-secondary" @click="query">查询</a>
								<a class="btn btn-primary" @click="generator"><i class="fa fa-file-code-o"></i>&nbsp;生成代码</a>
								</div>
							</div>
						</div>
					    <table id="jqGrid" class="table table-bordered table-striped table-sm"></table>
					    <div id="jqGridPager"></div>
                </div>
            </div>
            <!-- /.conainer-fluid -->
        </main>
    </div>
		<!-- 修改密码 -->
		<div id="passwordLayer" style="display: none;">
			<form action="" method="post" class="form-horizontal">
				<div class="form-group row mx-0">
					<label class="col-md-3 form-control-label">账号</label>
					<div class="col-md-9">
						<p class="form-control-static">{{username}}</p>
					</div>
				</div>
				<div class="form-group row mx-0">
					<label class="col-md-3 form-control-label">原密码</label>
					<div class="col-md-9">
						<input type="password" class="form-control"
							v-model.trim="password" placeholder="原密码">
					</div>
				</div>
				<div class="form-group row mx-0">
					<label class="col-md-3 form-control-label">新密码</label>
					<div class="col-md-9">
						<input type="text" v-model.trim="newPassword" class="form-control"
							placeholder="新密码">
					</div>
				</div>
			</form>
		</div>
		<footer class="app-footer">
        <a href="http://coreui.io">CoreUI</a> © 2017 creativeLabs.
        <span class="float-right">Powered by <a href="http://coreui.io">CoreUI</a>
        </span>
    </footer>
	</div>

    <!-- Bootstrap and necessary plugins -->
    <script src="../public/plugins/jquery.min.js"></script>
    <script src="../public/plugins/tether/js/tether.min.js"></script>
    <script src="../public/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="../public/plugins/pace.min.js"></script>
	<script src="../public/plugins/vue.min.js"></script>
	<script src="../public/plugins/layer/layer.js"></script>
	<script src="../public/libs/store.everything.min.js"></script>
	<script src="../public/plugins/jqgrid/grid.locale-cn.js"></script>
	<script src="../public/plugins/jqgrid/jquery.jqGrid.min.js"></script>
	<script src="../public/plugins/ztree/jquery.ztree.all.min.js"></script>
    <!-- GenesisUI main scripts -->
    <script src="../public/js/app.js"></script>
    <script src="../public/js/views/sys/generator.js"></script>
</body>
</html>
